package com.xxx.ssm.baem.Tset;

import com.xxx.ssm.baem.Person;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Mytest {

    public static void main(String[] args) {
        //主动创建
        Person person =new Person();
        person.sayHi();
        System.out.println("..............ioc的方式................");
        //改成ioc中取person对象

        ClassPathXmlApplicationContext context =new ClassPathXmlApplicationContext("applicationContext.xml");

        Person personName = context.getBean("personName", Person.class);
        personName.sayHi();
    }
}
